package leetcode.offer_two_special.binary;

/**
 * @author mazouri
 * @create 2021-09-21 12:42
 */
public class _68_searchInsert {
    public int searchInsert(int[] nums, int target) {
        int i = 0;
        for ( i = 0; i < nums.length; i++) {
            if (target <= nums[i]) return i;
        }

        return i;
    }

    public static void main(String[] args) {
        System.out.println(new _68_searchInsert().searchInsert(new int[]{1, 3, 5, 6}, 5));
    }
}
